import { Component, OnInit, Input, Output, OnChanges } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { parse } from 'url';

@Component({
  selector: 'app-list4',
  templateUrl: './list4.component.html',
  styleUrls: ['./list4.component.scss']
})
export class List4Component implements OnInit {

  // Sheet 1
  @Output() s1_arr: any;
  @Output() s2_arr: any;
  @Output() s3_arr: any;
  
  constructor() {
    this.s1_arr = {};
    this.s2_arr = {};
    this.s3_arr = {};

    // 初始化以下参数
    this.s1_arr['c5'] = 300;

    this.s1_arr['c8'] = 780;
    this.s1_arr['f8'] = 840;
    this.s1_arr['i8'] = 880;
    this.s1_arr['l8'] = 880;
    this.s1_arr['o8'] = 880;
    this.s1_arr['r8'] = 820;
    this.s1_arr['u8'] = 840;
    this.s1_arr['x8'] = 840;
    this.s1_arr['aa8'] = 840;
    this.s1_arr['ad8'] = 840;

    this.s1_arr['c9'] = 65;
    this.s1_arr['f9'] = 70;
    this.s1_arr['i9'] = 72;
    this.s1_arr['l9'] = 72;
    this.s1_arr['o9'] = 72;
    this.s1_arr['r9'] = 65;
    this.s1_arr['u9'] = 70;
    this.s1_arr['x9'] = 70;
    this.s1_arr['aa9'] = 70;
    this.s1_arr['ad9'] = 70;

    this.s1_arr['c10'] = 0.9;

    this.s1_arr['c11'] = 0.08;

    this.s1_arr['c12'] = 16;

    this.s1_arr['d22'] = 25;
    this.s1_arr['g22'] = 22;
    this.s1_arr['j22'] = 20;
    this.s1_arr['m22'] = 20;
    this.s1_arr['p22'] = 20;
    this.s1_arr['s22'] = 20;
    this.s1_arr['v22'] = 19;
    this.s1_arr['y22'] = 19;
    this.s1_arr['ab22'] = 19;
    this.s1_arr['ae22'] = 19;

    this.s1_arr['d23'] = 75;
    this.s1_arr['g23'] = 72;
    this.s1_arr['j23'] = 70;
    this.s1_arr['m23'] = 70;
    this.s1_arr['p23'] = 70;
    this.s1_arr['s23'] = 70;
    this.s1_arr['v23'] = 69;
    this.s1_arr['y23'] = 69;
    this.s1_arr['ab23'] = 69;
    this.s1_arr['ae23'] = 69;

    this.s1_arr['d24'] = 40;
    this.s1_arr['g24'] = 38;
    this.s1_arr['j24'] = 38;
    this.s1_arr['m24'] = 36;
    this.s1_arr['p24'] = 36;
    this.s1_arr['s24'] = 36;
    this.s1_arr['v24'] = 36;
    this.s1_arr['y24'] = 36;
    this.s1_arr['ab24'] = 36;
    this.s1_arr['ae24'] = 36;

    this.s1_arr['d35'] = 7;
    this.s1_arr['g35'] = 6.5;
    this.s1_arr['j35'] = 6;
    this.s1_arr['m35'] = 5.5;
    this.s1_arr['p35'] = 5.5;
    this.s1_arr['s35'] = 5.5;
    this.s1_arr['v35'] = 5.5;
    this.s1_arr['y35'] = 5.5;
    this.s1_arr['ab35'] = 5.5;
    this.s1_arr['ae35'] = 5.5;

    this.s1_arr['d36'] = 1.5;
    this.s1_arr['g36'] = 1.2;
    this.s1_arr['j36'] = 1;
    this.s1_arr['m36'] = 1;
    this.s1_arr['p36'] = 1;
    this.s1_arr['s36'] = 1;
    this.s1_arr['v36'] = 1;
    this.s1_arr['y36'] = 1;
    this.s1_arr['ab36'] = 1;
    this.s1_arr['ae36'] = 1;

    this.s1_arr['d37'] = 6;
    this.s1_arr['g37'] = 5.5;
    this.s1_arr['j37'] = 5.5;
    this.s1_arr['m37'] = 5.5;
    this.s1_arr['p37'] = 5;
    this.s1_arr['s37'] = 5.5;
    this.s1_arr['v37'] = 5.5;
    this.s1_arr['y37'] = 5.5;
    this.s1_arr['ab37'] = 5.5;
    this.s1_arr['ae37'] = 5.5;

    this.s1_arr['d38'] = 10;
    this.s1_arr['g38'] = 10;
    this.s1_arr['j38'] = 9.5;
    this.s1_arr['m38'] = 9;
    this.s1_arr['p38'] = 9;
    this.s1_arr['s38'] = 9;
    this.s1_arr['v38'] = 9;
    this.s1_arr['y38'] = 9;
    this.s1_arr['ab38'] = 9;
    this.s1_arr['ae38'] = 9;

    this.s1_arr['d39'] = 2;
    this.s1_arr['g39'] = 2;
    this.s1_arr['j39'] = 2.5;
    this.s1_arr['m39'] = 2.5;
    this.s1_arr['p39'] = 2.5;
    this.s1_arr['s39'] = 2.5;
    this.s1_arr['v39'] = 2.5;
    this.s1_arr['y39'] = 2.5;
    this.s1_arr['ab39'] = 2.5;
    this.s1_arr['ae39'] = 2.5;

    this.s1_arr['b45'] = 2.25;
    this.s1_arr['b46'] = 5.5;
    this.s1_arr['b48'] = 2.5;
    this.s1_arr['b49'] = 0.1;
    this.s1_arr['b50'] = 350000000;
    this.s1_arr['b51'] = 5;
    this.s1_arr['b52'] = 10;
    this.s1_arr['b54'] = 33;
    
    this.s1_arr['c47'] = 500000;
    this.s1_arr['f47'] = 500000;
    this.s1_arr['i47'] = 500000;
    this.s1_arr['l47'] = 500000;
    this.s1_arr['o47'] = 500000;
    this.s1_arr['r47'] = 500000;
    this.s1_arr['u47'] = 500000;
    this.s1_arr['x47'] = 500000;
    this.s1_arr['aa47'] = 500000;
    this.s1_arr['ad47'] = 500000;


    this.s1_arr['b69'] = 350000000;
    this.s1_arr[''] = 0;
    this.s1_arr[''] = 0;


    this.recal_s1();

    // 初始化s2
    this.s2_arr['c5'] = 300;

    this.s2_arr['c8'] = 780;
    this.s2_arr['f8'] = 840;
    this.s2_arr['i8'] = 880;
    this.s2_arr['l8'] = 880;
    this.s2_arr['o8'] = 880;
    this.s2_arr['r8'] = 820;
    this.s2_arr['u8'] = 840;
    this.s2_arr['x8'] = 840;
    this.s2_arr['aa8'] = 840;
    this.s2_arr['ad8'] = 840;

    this.s2_arr['c9'] = 65;
    this.s2_arr['f9'] = 70;
    this.s2_arr['i9'] = 72;
    this.s2_arr['l9'] = 72;
    this.s2_arr['o9'] = 72;
    this.s2_arr['r9'] = 65;
    this.s2_arr['u9'] = 70;
    this.s2_arr['x9'] = 70;
    this.s2_arr['aa9'] = 70;
    this.s2_arr['ad9'] = 70;

    this.s2_arr['c10'] = 0.9;

    this.s2_arr['c11'] = 0.08;

    this.s2_arr['c12'] = 16;

    this.s2_arr['d22'] = 25;
    this.s2_arr['g22'] = 22;
    this.s2_arr['j22'] = 20;
    this.s2_arr['m22'] = 20;
    this.s2_arr['p22'] = 20;
    this.s2_arr['s22'] = 20;
    this.s2_arr['v22'] = 19;
    this.s2_arr['y22'] = 19;
    this.s2_arr['ab22'] = 19;
    this.s2_arr['ae22'] = 19;

    this.s2_arr['d23'] = 75;
    this.s2_arr['g23'] = 72;
    this.s2_arr['j23'] = 70;
    this.s2_arr['m23'] = 70;
    this.s2_arr['p23'] = 70;
    this.s2_arr['s23'] = 70;
    this.s2_arr['v23'] = 69;
    this.s2_arr['y23'] = 69;
    this.s2_arr['ab23'] = 69;
    this.s2_arr['ae23'] = 69;

    this.s2_arr['d24'] = 40;
    this.s2_arr['g24'] = 38;
    this.s2_arr['j24'] = 38;
    this.s2_arr['m24'] = 36;
    this.s2_arr['p24'] = 36;
    this.s2_arr['s24'] = 36;
    this.s2_arr['v24'] = 36;
    this.s2_arr['y24'] = 36;
    this.s2_arr['ab24'] = 36;
    this.s2_arr['ae24'] = 36;

    this.s2_arr['d35'] = 7;
    this.s2_arr['g35'] = 6.5;
    this.s2_arr['j35'] = 6;
    this.s2_arr['m35'] = 5.5;
    this.s2_arr['p35'] = 5.5;
    this.s2_arr['s35'] = 5.5;
    this.s2_arr['v35'] = 5.5;
    this.s2_arr['y35'] = 5.5;
    this.s2_arr['ab35'] = 5.5;
    this.s2_arr['ae35'] = 5.5;

    this.s2_arr['d36'] = 1.5;
    this.s2_arr['g36'] = 1.2;
    this.s2_arr['j36'] = 1;
    this.s2_arr['m36'] = 1;
    this.s2_arr['p36'] = 1;
    this.s2_arr['s36'] = 1;
    this.s2_arr['v36'] = 1;
    this.s2_arr['y36'] = 1;
    this.s2_arr['ab36'] = 1;
    this.s2_arr['ae36'] = 1;

    this.s2_arr['d37'] = 6;
    this.s2_arr['g37'] = 5.5;
    this.s2_arr['j37'] = 5.5;
    this.s2_arr['m37'] = 5.5;
    this.s2_arr['p37'] = 5;
    this.s2_arr['s37'] = 5.5;
    this.s2_arr['v37'] = 5.5;
    this.s2_arr['y37'] = 5.5;
    this.s2_arr['ab37'] = 5.5;
    this.s2_arr['ae37'] = 5.5;

    this.s2_arr['d38'] = 10;
    this.s2_arr['g38'] = 10;
    this.s2_arr['j38'] = 9.5;
    this.s2_arr['m38'] = 9;
    this.s2_arr['p38'] = 9;
    this.s2_arr['s38'] = 9;
    this.s2_arr['v38'] = 9;
    this.s2_arr['y38'] = 9;
    this.s2_arr['ab38'] = 9;
    this.s2_arr['ae38'] = 9;

    this.s2_arr['d39'] = 2;
    this.s2_arr['g39'] = 2;
    this.s2_arr['j39'] = 2.5;
    this.s2_arr['m39'] = 2.5;
    this.s2_arr['p39'] = 2.5;
    this.s2_arr['s39'] = 2.5;
    this.s2_arr['v39'] = 2.5;
    this.s2_arr['y39'] = 2.5;
    this.s2_arr['ab39'] = 2.5;
    this.s2_arr['ae39'] = 2.5;

    this.s2_arr['b45'] = 2.25;
    this.s2_arr['b46'] = 5.5;
    this.s2_arr['b48'] = 2.5;
    this.s2_arr['b49'] = 0.1;
    this.s2_arr['b50'] = 350000000;
    this.s2_arr['b51'] = 5;
    this.s2_arr['b52'] = 10;
    this.s2_arr['b55'] = 33;
    
    this.s2_arr['c47'] = 500000;
    this.s2_arr['f47'] = 500000;
    this.s2_arr['i47'] = 500000;
    this.s2_arr['l47'] = 500000;
    this.s2_arr['o47'] = 500000;
    this.s2_arr['r47'] = 500000;
    this.s2_arr['u47'] = 500000;
    this.s2_arr['x47'] = 500000;
    this.s2_arr['aa47'] = 500000;
    this.s2_arr['ad47'] = 500000;

    this.s2_arr['b70'] = 350000000;

    this.recal_s2();
  }

  ngOnInit() {
  }

  recal_s1(){
    var copy_list = ['f', 'i', 'l', 'o', 'r', 'u', 'x', 'aa', 'ad'];

    copy_list.forEach(item => {
      this.s1_arr[item+'5'] = this.s1_arr['c5'];
      this.s1_arr[item+'10'] = this.s1_arr['c10'];
      this.s1_arr[item+'11'] = this.s1_arr['c11'];
      this.s1_arr[item+'12'] = this.s1_arr['c12'];
    });

    // 合计
    this.s1_arr['af14'] = 0;
    this.s1_arr['af15'] = 0;
    this.s1_arr['af16'] = 0;
    this.s1_arr['af17'] = 0;
    this.s1_arr['af18'] = 0;
    this.s1_arr['af19'] = 0;

    this.s1_arr['af22'] = 0;
    this.s1_arr['af23'] = 0;
    this.s1_arr['af24'] = 0;
    this.s1_arr['af25'] = 0;

    this.s1_arr['af28'] = 0;
    this.s1_arr['af29'] = 0;
    this.s1_arr['af30'] = 0;
    this.s1_arr['af31'] = 0;
    this.s1_arr['af32'] = 0;

    this.s1_arr['af35'] = 0;
    this.s1_arr['af36'] = 0;
    this.s1_arr['af37'] = 0;
    this.s1_arr['af38'] = 0;
    this.s1_arr['af39'] = 0;
    this.s1_arr['af40'] = 0;

    this.s1_arr['af43'] = 0;

    this.s1_arr['af45'] = 0;
    this.s1_arr['af46'] = 0;
    this.s1_arr['af47'] = 0;
    this.s1_arr['af48'] = 0;
    this.s1_arr['af49'] = 0;
    this.s1_arr['af50'] = 0;
    this.s1_arr['af51'] = 0;
    this.s1_arr['af52'] = 0;
    this.s1_arr['af54'] = 0;
    this.s1_arr['af55'] = 0;

    this.s1_arr['af59'] = 0;
    this.s1_arr['af60'] = 0;
    this.s1_arr['af61'] = 0;
    this.s1_arr['af62'] = 0;
    this.s1_arr['af63'] = 0;
    this.s1_arr['af64'] = 0;
    this.s1_arr['af65'] = 0;
    this.s1_arr['af66'] = 0;
    this.s1_arr['af67'] = 0;
    this.s1_arr['af68'] = 0;
    this.s1_arr['af69'] = 0;
    this.s1_arr['af70'] = 0;
    this.s1_arr['af71'] = 0;
    this.s1_arr['af72'] = 0;
    this.s1_arr['af73'] = 0;

    var full_list = [['c', 'd'], ['f', 'g'], ['i', 'j'], ['l', 'm'], ['o', 'p'],
                     ['r', 's'], ['u', 'v'], ['x', 'y'], ['aa', 'ab'], ['ad', 'ae']];
                  
    var prev_item : any;
    full_list.forEach(item => {
      if (item[0] == 'f' || item[0] == 'r' || item[0] == 'ad'){
        this.s1_arr[item[0]+'6'] = parseFloat(this.s1_arr[item[0]+'5']) * 366;
      }else{
        this.s1_arr[item[0]+'6'] = parseFloat(this.s1_arr[item[0]+'5']) * 365;
      }

      this.s1_arr[item[0]+'7'] = parseFloat(this.s1_arr[item[0]+'6']) * parseFloat(this.s1_arr[item[0]+'9']) / 100;
      this.s1_arr[item[0]+'14'] = parseFloat(this.s1_arr[item[0]+'7']) * parseFloat(this.s1_arr[item[0]+'8']);
      this.s1_arr[item[0]+'15'] = parseFloat(this.s1_arr[item[0]+'14']) * parseFloat(this.s1_arr[item[0]+'10']);
      this.s1_arr[item[0]+'16'] = 12000000;
      this.s1_arr[item[0]+'17'] = parseFloat(this.s1_arr[item[0]+'14']) * parseFloat(this.s1_arr[item[0]+'11']);
      this.s1_arr[item[0]+'18'] = parseFloat(this.s1_arr[item[0]+'14']) * parseFloat(this.s1_arr[item[0]+'12']) / 100;

      this.s1_arr[item[0]+'19'] = parseFloat(this.s1_arr[item[0]+'14']) + parseFloat(this.s1_arr[item[0]+'15']) +
                         parseFloat(this.s1_arr[item[0]+'16']) + parseFloat(this.s1_arr[item[0]+'17']) + 
                         parseFloat(this.s1_arr[item[0]+'18']);

      this.s1_arr[item[0]+'22'] = parseFloat(this.s1_arr[item[0]+'14']) * parseFloat(this.s1_arr[item[1]+'22']) / 100;
      this.s1_arr[item[0]+'23'] = parseFloat(this.s1_arr[item[0]+'15']) * parseFloat(this.s1_arr[item[1]+'23']) / 100;
      this.s1_arr[item[0]+'24'] = parseFloat(this.s1_arr[item[0]+'17']) * parseFloat(this.s1_arr[item[1]+'24']) / 100;
      this.s1_arr[item[0]+'25'] = parseFloat(this.s1_arr[item[0]+'22']) + parseFloat(this.s1_arr[item[0]+'23']) +
                         parseFloat(this.s1_arr[item[0]+'24']);

      this.s1_arr[item[0]+'28'] = parseFloat(this.s1_arr[item[0]+'14']) - parseFloat(this.s1_arr[item[0]+'22']);
      this.s1_arr[item[0]+'29'] = parseFloat(this.s1_arr[item[0]+'15']) - parseFloat(this.s1_arr[item[0]+'23']);
      this.s1_arr[item[0]+'30'] = parseFloat(this.s1_arr[item[0]+'16']) + parseFloat(this.s1_arr[item[0]+'18']);
      this.s1_arr[item[0]+'31'] = parseFloat(this.s1_arr[item[0]+'17']) - parseFloat(this.s1_arr[item[0]+'24']);
      this.s1_arr[item[0]+'32'] = parseFloat(this.s1_arr[item[0]+'28']) + parseFloat(this.s1_arr[item[0]+'29']) +
                                  parseFloat(this.s1_arr[item[0]+'30']) + parseFloat(this.s1_arr[item[0]+'31']);

      this.s1_arr[item[0]+'35'] = parseFloat(this.s1_arr[item[0]+'19']) * parseFloat(this.s1_arr[item[1]+'35']) / 100;
      this.s1_arr[item[0]+'36'] = parseFloat(this.s1_arr[item[0]+'19']) * parseFloat(this.s1_arr[item[1]+'36']) / 100;
      this.s1_arr[item[0]+'37'] = parseFloat(this.s1_arr[item[0]+'19']) * parseFloat(this.s1_arr[item[1]+'37']) / 100;
      this.s1_arr[item[0]+'38'] = parseFloat(this.s1_arr[item[0]+'19']) * parseFloat(this.s1_arr[item[1]+'38']) / 100;
      this.s1_arr[item[0]+'39'] = parseFloat(this.s1_arr[item[0]+'19']) * parseFloat(this.s1_arr[item[1]+'39']) / 100;
      this.s1_arr[item[0]+'40'] = parseFloat(this.s1_arr[item[0]+'35']) + parseFloat(this.s1_arr[item[0]+'36']) +
                parseFloat(this.s1_arr[item[0]+'37']) + parseFloat(this.s1_arr[item[0]+'38']) + parseFloat(this.s1_arr[item[0]+'39']);

      this.s1_arr[item[0]+'43'] = parseFloat(this.s1_arr[item[0]+'32']) - parseFloat(this.s1_arr[item[0]+'40']);

      this.s1_arr[item[0]+'45'] = parseFloat(this.s1_arr[item[0]+'19']) * parseFloat(this.s1_arr['b45']) / 100;
      this.s1_arr[item[0]+'46'] = parseFloat(this.s1_arr[item[0]+'43']) * parseFloat(this.s1_arr['b46']) / 100;
      this.s1_arr[item[0]+'48'] = parseFloat(this.s1_arr[item[0]+'19']) * parseFloat(this.s1_arr['b48']) / 100;
      this.s1_arr[item[0]+'49'] = (parseFloat(this.s1_arr['b50']) * parseFloat(this.s1_arr['b49'])) / 100;
      this.s1_arr[item[0]+'50'] = parseFloat(this.s1_arr['b50']) / 20;
      this.s1_arr[item[0]+'51'] = parseFloat(this.s1_arr['b69']) * parseFloat(this.s1_arr['b51']) / 100;

      this.s1_arr[item[0]+'53'] = parseFloat(this.s1_arr[item[0]+'43']) - parseFloat(this.s1_arr[item[0]+'45']) -
                                  parseFloat(this.s1_arr[item[0]+'46']) - parseFloat(this.s1_arr[item[0]+'47']) -
                                  parseFloat(this.s1_arr[item[0]+'48']) - parseFloat(this.s1_arr[item[0]+'50']) -
                                  parseFloat(this.s1_arr[item[0]+'51']) - parseFloat(this.s1_arr[item[0]+'49']);
      this.s1_arr[item[0]+'54'] = this.s1_arr[item[0]+'53']<0 ? 0: parseFloat(this.s1_arr[item[0]+'53']) / parseFloat(this.s1_arr['b54']);
      this.s1_arr[item[0]+'55'] = parseFloat(this.s1_arr[item[0]+'53']) - parseFloat(this.s1_arr[item[0]+'54']);

      this.s1_arr[item[0]+'59'] = this.s1_arr[item[0]+'43'];
      this.s1_arr[item[0]+'60'] = this.s1_arr[item[0]+'45'];
      this.s1_arr[item[0]+'61'] = this.s1_arr[item[0]+'46'];
      this.s1_arr[item[0]+'62'] = this.s1_arr[item[0]+'47'];
      this.s1_arr[item[0]+'63'] = this.s1_arr[item[0]+'49'];
      this.s1_arr[item[0]+'64'] = this.s1_arr[item[0]+'51'];
      this.s1_arr[item[0]+'66'] = this.s1_arr[item[0]+'54'];

      this.s1_arr[item[0]+'67'] = parseFloat(this.s1_arr[item[0]+'59']) - parseFloat(this.s1_arr[item[0]+'60']) -
                                  parseFloat(this.s1_arr[item[0]+'61']) - parseFloat(this.s1_arr[item[0]+'62']) -
                                  parseFloat(this.s1_arr[item[0]+'63']) - parseFloat(this.s1_arr[item[0]+'64']) -
                                  parseFloat(this.s1_arr[item[0]+'66']);

      this.s1_arr[item[0]+'68'] = this.s1_arr[item[0]+'67'];
      if(prev_item){
        this.s1_arr[item[0]+'69'] = parseFloat(this.s1_arr[prev_item[0]+'69']) - parseFloat(this.s1_arr[item[0]+'68']);
      }else{ // 第一条记录
        this.s1_arr[item[0]+'69'] = parseFloat(this.s1_arr['b69']) - parseFloat(this.s1_arr[item[0]+'68']);
      }

      this.s1_arr[item[0]+'70'] = this.s1_arr[item[0]+'69'] > 0 ? 
                            0 : parseFloat(this.s1_arr[item[0]+'67']) - parseFloat(this.s1_arr[item[0]+'68']);

      this.s1_arr[item[0]+'71'] = parseFloat(this.s1_arr[item[0]+'69']) - parseFloat(this.s1_arr[item[0]+'70']) > 0?
                  parseFloat(this.s1_arr[item[0]+'69']) - parseFloat(this.s1_arr[item[0]+'70']) : 0;

      this.s1_arr[item[0]+'72'] = this.s1_arr[item[0]+'70'] == 0 ? 0 :
                  parseFloat(this.s1_arr[item[0]+'70']) - parseFloat(this.s1_arr[item[0]+'71']) > 0 ?
                  this.s1_arr[item[0]+'71'] : this.s1_arr[item[0]+'70'];

      this.s1_arr[item[0]+'73'] = parseFloat(this.s1_arr[item[0]+'70']) - parseFloat(this.s1_arr[item[0]+'72']) > 0 ?
                  parseFloat(this.s1_arr[item[0]+'70']) - parseFloat(this.s1_arr[item[0]+'72']) : 0;

      // 比例部分处理
      this.s1_arr[item[1]+'14'] = parseFloat(this.s1_arr[item[0]+'14']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;
      this.s1_arr[item[1]+'15'] = parseFloat(this.s1_arr[item[0]+'15']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;
      this.s1_arr[item[1]+'16'] = parseFloat(this.s1_arr[item[0]+'16']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;
      this.s1_arr[item[1]+'17'] = parseFloat(this.s1_arr[item[0]+'17']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;
      this.s1_arr[item[1]+'18'] = parseFloat(this.s1_arr[item[0]+'18']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;

      this.s1_arr[item[1]+'19'] = parseFloat(this.s1_arr[item[1]+'14']) + parseFloat(this.s1_arr[item[1]+'15']) +
                parseFloat(this.s1_arr[item[1]+'16']) + parseFloat(this.s1_arr[item[1]+'17']) + parseFloat(this.s1_arr[item[1]+'18']);
      
      this.s1_arr[item[1]+'25'] = parseFloat(this.s1_arr[item[0]+'25']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;

      this.s1_arr[item[1]+'28'] = parseFloat(this.s1_arr[item[0]+'28']) / parseFloat(this.s1_arr[item[0]+'14']) * 100;
      this.s1_arr[item[1]+'29'] = parseFloat(this.s1_arr[item[0]+'29']) / parseFloat(this.s1_arr[item[0]+'15']) * 100;
      this.s1_arr[item[1]+'30'] = parseFloat(this.s1_arr[item[0]+'30']) / 
              (parseFloat(this.s1_arr[item[0]+'16']) + parseFloat(this.s1_arr[item[0]+'18'])) * 100;
      this.s1_arr[item[1]+'31'] = parseFloat(this.s1_arr[item[0]+'31']) / parseFloat(this.s1_arr[item[0]+'17']) * 100;
      this.s1_arr[item[1]+'32'] = parseFloat(this.s1_arr[item[0]+'32']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;

      this.s1_arr[item[1]+'40'] = parseFloat(this.s1_arr[item[0]+'40']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;

      this.s1_arr[item[1]+'43'] = parseFloat(this.s1_arr[item[0]+'43']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;

      this.s1_arr[item[1]+'45'] = parseFloat(this.s1_arr[item[0]+'45']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;
      this.s1_arr[item[1]+'46'] = parseFloat(this.s1_arr[item[0]+'46']) / parseFloat(this.s1_arr[item[0]+'43']) * 100;
      this.s1_arr[item[1]+'47'] = parseFloat(this.s1_arr[item[0]+'47']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;
      this.s1_arr[item[1]+'48'] = parseFloat(this.s1_arr[item[0]+'48']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;
      this.s1_arr[item[1]+'49'] = parseFloat(this.s1_arr[item[0]+'49']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;
      this.s1_arr[item[1]+'50'] = parseFloat(this.s1_arr[item[0]+'50']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;
      this.s1_arr[item[1]+'51'] = parseFloat(this.s1_arr[item[0]+'51']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;

      this.s1_arr[item[1]+'53'] = parseFloat(this.s1_arr[item[0]+'53']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;
      this.s1_arr[item[1]+'54'] = parseFloat(this.s1_arr[item[0]+'54']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;
      this.s1_arr[item[1]+'55'] = parseFloat(this.s1_arr[item[0]+'55']) / parseFloat(this.s1_arr[item[0]+'19']) * 100;

      this.s1_arr['af14'] += this.s1_arr[item[0]+'14'];
      this.s1_arr['af15'] += this.s1_arr[item[0]+'15'];
      this.s1_arr['af16'] += this.s1_arr[item[0]+'16'];
      this.s1_arr['af17'] += this.s1_arr[item[0]+'17'];
      this.s1_arr['af18'] += this.s1_arr[item[0]+'18'];
      this.s1_arr['af19'] += this.s1_arr[item[0]+'19'];

      this.s1_arr['af22'] += this.s1_arr[item[0]+'22'];
      this.s1_arr['af23'] += this.s1_arr[item[0]+'23'];
      this.s1_arr['af24'] += this.s1_arr[item[0]+'24'];
      this.s1_arr['af25'] += this.s1_arr[item[0]+'25'];

      this.s1_arr['af28'] += this.s1_arr[item[0]+'28'];
      this.s1_arr['af29'] += this.s1_arr[item[0]+'29'];
      this.s1_arr['af30'] += this.s1_arr[item[0]+'30'];
      this.s1_arr['af31'] += this.s1_arr[item[0]+'31'];
      this.s1_arr['af32'] += this.s1_arr[item[0]+'32'];

      this.s1_arr['af35'] += this.s1_arr[item[0]+'35'];
      // console.log(this.s1_arr[item[0]+'35']);
      this.s1_arr['af36'] += this.s1_arr[item[0]+'36'];
      this.s1_arr['af37'] += this.s1_arr[item[0]+'37'];
      this.s1_arr['af38'] += this.s1_arr[item[0]+'38'];
      this.s1_arr['af39'] += this.s1_arr[item[0]+'39'];
      this.s1_arr['af40'] += this.s1_arr[item[0]+'40'];

      this.s1_arr['af43'] += this.s1_arr[item[0]+'43'];

      this.s1_arr['af45'] += this.s1_arr[item[0]+'45'];
      this.s1_arr['af46'] += this.s1_arr[item[0]+'46'];
      this.s1_arr['af47'] += this.s1_arr[item[0]+'47'];
      this.s1_arr['af48'] += this.s1_arr[item[0]+'48'];
      this.s1_arr['af49'] += this.s1_arr[item[0]+'49'];
      this.s1_arr['af50'] += this.s1_arr[item[0]+'50'];
      this.s1_arr['af51'] += this.s1_arr[item[0]+'51'];
      this.s1_arr['af53'] += this.s1_arr[item[0]+'53'];
      this.s1_arr['af54'] += this.s1_arr[item[0]+'54'];
      this.s1_arr['af55'] += this.s1_arr[item[0]+'55'];

      this.s1_arr['af59'] += this.s1_arr[item[0]+'59'];
      this.s1_arr['af60'] += this.s1_arr[item[0]+'60'];
      this.s1_arr['af61'] += this.s1_arr[item[0]+'61'];
      this.s1_arr['af62'] += this.s1_arr[item[0]+'62'];
      this.s1_arr['af63'] += this.s1_arr[item[0]+'63'];
      this.s1_arr['af64'] += this.s1_arr[item[0]+'64'];
      this.s1_arr['af65'] += this.s1_arr[item[0]+'65'];
      this.s1_arr['af66'] += this.s1_arr[item[0]+'66'];
      this.s1_arr['af67'] += this.s1_arr[item[0]+'67'];
      this.s1_arr['af68'] += this.s1_arr[item[0]+'68'];
      this.s1_arr['af69'] += this.s1_arr[item[0]+'69'];
      this.s1_arr['af70'] += this.s1_arr[item[0]+'70'];
      this.s1_arr['af71'] += this.s1_arr[item[0]+'71'];
      this.s1_arr['af72'] += this.s1_arr[item[0]+'72'];
      this.s1_arr['af73'] += this.s1_arr[item[0]+'73'];

      prev_item = item;
    });
  }

  recal_s2(){
    // 合计
    this.s2_arr['af14'] = 0;
    this.s2_arr['af15'] = 0;
    this.s2_arr['af16'] = 0;
    this.s2_arr['af17'] = 0;
    this.s2_arr['af18'] = 0;
    this.s2_arr['af19'] = 0;

    this.s2_arr['af22'] = 0;
    this.s2_arr['af23'] = 0;
    this.s2_arr['af24'] = 0;
    this.s2_arr['af25'] = 0;

    this.s2_arr['af28'] = 0;
    this.s2_arr['af29'] = 0;
    this.s2_arr['af30'] = 0;
    this.s2_arr['af31'] = 0;
    this.s2_arr['af32'] = 0;

    this.s2_arr['af35'] = 0;
    this.s2_arr['af36'] = 0;
    this.s2_arr['af37'] = 0;
    this.s2_arr['af38'] = 0;
    this.s2_arr['af39'] = 0;
    this.s2_arr['af40'] = 0;

    this.s2_arr['af43'] = 0;

    this.s2_arr['af45'] = 0;
    this.s2_arr['af46'] = 0;
    this.s2_arr['af47'] = 0;
    this.s2_arr['af48'] = 0;
    this.s2_arr['af49'] = 0;
    this.s2_arr['af50'] = 0;
    this.s2_arr['af51'] = 0;
    this.s2_arr['af52'] = 0;
    this.s2_arr['af54'] = 0;
    this.s2_arr['af55'] = 0;
    this.s2_arr['af56'] = 0;

    this.s2_arr['af60'] = 0;
    this.s2_arr['af61'] = 0;
    this.s2_arr['af62'] = 0;
    this.s2_arr['af63'] = 0;
    this.s2_arr['af64'] = 0;
    this.s2_arr['af65'] = 0;
    this.s2_arr['af66'] = 0;
    this.s2_arr['af67'] = 0;
    this.s2_arr['af68'] = 0;
    this.s2_arr['af69'] = 0;
    
    this.s2_arr['af71'] = 0;
    this.s2_arr['af72'] = 0;
    this.s2_arr['af73'] = 0;
    this.s2_arr['af74'] = 0;

    var copy_list = ['f', 'i', 'l', 'o', 'r', 'u', 'x', 'aa', 'ad'];

    copy_list.forEach(item => {
      this.s2_arr[item+'5'] = this.s2_arr['c5'];
      this.s2_arr[item+'10'] = this.s2_arr['c10'];
      this.s2_arr[item+'11'] = this.s2_arr['c11'];
      this.s2_arr[item+'12'] = this.s2_arr['c12'];
    });

    var full_list = [['c', 'd'], ['f', 'g'], ['i', 'j'], ['l', 'm'], ['o', 'p'],
                     ['r', 's'], ['u', 'v'], ['x', 'y'], ['aa', 'ab'], ['ad', 'ae']];

    var prev_item : any;
    full_list.forEach(item => {
      if (item[0] == 'f' || item[0] == 'r' || item[0] == 'ad'){
        this.s2_arr[item[0]+'6'] = parseFloat(this.s2_arr[item[0]+'5']) * 366;
      }else{
        this.s2_arr[item[0]+'6'] = parseFloat(this.s2_arr[item[0]+'5']) * 365;
      }

      this.s2_arr[item[0]+'7'] = parseFloat(this.s2_arr[item[0]+'6']) * parseFloat(this.s2_arr[item[0]+'9']) / 100;

      this.s2_arr[item[0]+'14'] = parseFloat(this.s2_arr[item[0]+'7']) * parseFloat(this.s2_arr[item[0]+'8']);
      this.s2_arr[item[0]+'15'] = parseFloat(this.s2_arr[item[0]+'14']) * parseFloat(this.s2_arr[item[0]+'10']);
      this.s2_arr[item[0]+'16'] = 12000000;
      this.s2_arr[item[0]+'17'] = parseFloat(this.s2_arr[item[0]+'14']) * parseFloat(this.s2_arr[item[0]+'11']);
      this.s2_arr[item[0]+'18'] = parseFloat(this.s2_arr[item[0]+'14']) * parseFloat(this.s2_arr[item[0]+'12']) / 100;

      this.s2_arr[item[0]+'19'] = parseFloat(this.s2_arr[item[0]+'14']) + parseFloat(this.s2_arr[item[0]+'15']) +
                         parseFloat(this.s2_arr[item[0]+'16']) + parseFloat(this.s2_arr[item[0]+'17']) + 
                         parseFloat(this.s2_arr[item[0]+'18']);

      this.s2_arr[item[0]+'22'] = parseFloat(this.s2_arr[item[0]+'14']) * parseFloat(this.s2_arr[item[1]+'22']) / 100;
      this.s2_arr[item[0]+'23'] = parseFloat(this.s2_arr[item[0]+'15']) * parseFloat(this.s2_arr[item[1]+'23']) / 100;
      this.s2_arr[item[0]+'24'] = parseFloat(this.s2_arr[item[0]+'17']) * parseFloat(this.s2_arr[item[1]+'24']) / 100;
      this.s2_arr[item[0]+'25'] = parseFloat(this.s2_arr[item[0]+'22']) + parseFloat(this.s2_arr[item[0]+'23']) +
                         parseFloat(this.s2_arr[item[0]+'24']);

      this.s2_arr[item[0]+'28'] = parseFloat(this.s2_arr[item[0]+'14']) - parseFloat(this.s2_arr[item[0]+'22']);
      this.s2_arr[item[0]+'29'] = parseFloat(this.s2_arr[item[0]+'15']) - parseFloat(this.s2_arr[item[0]+'23']);
      this.s2_arr[item[0]+'30'] = parseFloat(this.s2_arr[item[0]+'16']) + parseFloat(this.s2_arr[item[0]+'18']);
      this.s2_arr[item[0]+'31'] = parseFloat(this.s2_arr[item[0]+'17']) - parseFloat(this.s2_arr[item[0]+'24']);
      this.s2_arr[item[0]+'32'] = parseFloat(this.s2_arr[item[0]+'28']) + parseFloat(this.s2_arr[item[0]+'29']) +
                                  parseFloat(this.s2_arr[item[0]+'30']) + parseFloat(this.s2_arr[item[0]+'31']);

      this.s2_arr[item[0]+'35'] = parseFloat(this.s2_arr[item[0]+'19']) * parseFloat(this.s2_arr[item[1]+'35']) / 100;
      this.s2_arr[item[0]+'36'] = parseFloat(this.s2_arr[item[0]+'19']) * parseFloat(this.s2_arr[item[1]+'36']) / 100;
      this.s2_arr[item[0]+'37'] = parseFloat(this.s2_arr[item[0]+'19']) * parseFloat(this.s2_arr[item[1]+'37']) / 100;
      this.s2_arr[item[0]+'38'] = parseFloat(this.s2_arr[item[0]+'19']) * parseFloat(this.s2_arr[item[1]+'38']) / 100;
      this.s2_arr[item[0]+'39'] = parseFloat(this.s2_arr[item[0]+'19']) * parseFloat(this.s2_arr[item[1]+'39']) / 100;
      this.s2_arr[item[0]+'40'] = parseFloat(this.s2_arr[item[0]+'35']) + parseFloat(this.s2_arr[item[0]+'36']) +
                parseFloat(this.s2_arr[item[0]+'37']) + parseFloat(this.s2_arr[item[0]+'38']) + parseFloat(this.s2_arr[item[0]+'39']);

      this.s2_arr[item[0]+'43'] = parseFloat(this.s2_arr[item[0]+'32']) - parseFloat(this.s2_arr[item[0]+'40']);

      this.s2_arr[item[0]+'45'] = parseFloat(this.s2_arr[item[0]+'19']) * parseFloat(this.s2_arr['b45']) / 100;
      this.s2_arr[item[0]+'46'] = parseFloat(this.s2_arr[item[0]+'43']) * parseFloat(this.s2_arr['b46']) / 100;
      this.s2_arr[item[0]+'48'] = parseFloat(this.s2_arr[item[0]+'19']) * parseFloat(this.s2_arr['b48']) / 100;
      this.s2_arr[item[0]+'49'] = (parseFloat(this.s2_arr['b50']) * parseFloat(this.s2_arr['b49'])) / 100;
      this.s2_arr[item[0]+'50'] = parseFloat(this.s2_arr['b50']) / 20;

      if(prev_item){
        this.s2_arr[item[0]+'51'] = parseFloat(this.s2_arr[prev_item[0]+'70']) * parseFloat(this.s2_arr['b51']) / 100;
      }else{
        this.s2_arr[item[0]+'51'] = parseFloat(this.s2_arr['b70']) * parseFloat(this.s2_arr['b51']) / 100;
      }

      this.s2_arr[item[0]+'53'] = parseFloat(this.s2_arr[item[0]+'43']) - parseFloat(this.s2_arr[item[0]+'45']) -
                                  parseFloat(this.s2_arr[item[0]+'46']) - parseFloat(this.s2_arr[item[0]+'47']) -
                                  parseFloat(this.s2_arr[item[0]+'49']) - parseFloat(this.s2_arr[item[0]+'51']);
      this.s2_arr[item[0]+'54'] = parseFloat(this.s2_arr[item[0]+'43']) - parseFloat(this.s2_arr[item[0]+'45']) -
                                  parseFloat(this.s2_arr[item[0]+'46']) - parseFloat(this.s2_arr[item[0]+'47']) -
                                  parseFloat(this.s2_arr[item[0]+'49']) - parseFloat(this.s2_arr[item[0]+'51']) - 
                                  parseFloat(this.s2_arr[item[0]+'53']);
      this.s2_arr[item[0]+'55'] = parseFloat(this.s2_arr[item[0]+'54']) < 0 ? 0 :
                                  parseFloat(this.s2_arr[item[0]+'54']) * parseFloat(this.s2_arr['b55']);
      this.s2_arr[item[0]+'56'] = parseFloat(this.s2_arr[item[0]+'54']) - parseFloat(this.s2_arr[item[0]+'55']);

      this.s2_arr[item[0]+'60'] = this.s2_arr[item[0]+'43'];
      this.s2_arr[item[0]+'61'] = this.s2_arr[item[0]+'45'];
      this.s2_arr[item[0]+'62'] = this.s2_arr[item[0]+'46'];
      this.s2_arr[item[0]+'63'] = this.s2_arr[item[0]+'47'];
      this.s2_arr[item[0]+'64'] = this.s2_arr[item[0]+'49'];
      this.s2_arr[item[0]+'65'] = this.s2_arr[item[0]+'51'];
      this.s2_arr[item[0]+'67'] = this.s2_arr[item[0]+'55'];
      this.s2_arr[item[0]+'68'] = parseFloat(this.s2_arr[item[0]+'60']) - parseFloat(this.s2_arr[item[0]+'61']) -
                                  parseFloat(this.s2_arr[item[0]+'62']) - parseFloat(this.s2_arr[item[0]+'63']) -
                                  parseFloat(this.s2_arr[item[0]+'64']) - parseFloat(this.s2_arr[item[0]+'65']) -
                                  parseFloat(this.s2_arr[item[0]+'67']);

      this.s2_arr[item[0]+'69'] = this.s2_arr[item[0]+'68'];

      if(prev_item){
        this.s2_arr[item[0]+'70'] = parseFloat(this.s2_arr[prev_item[0]+'70']) - parseFloat(this.s2_arr[item[0]+'69']);
      }else{
        this.s2_arr[item[0]+'70'] = parseFloat(this.s2_arr['b70']) - parseFloat(this.s2_arr[item[0]+'69']);
      }

      this.s2_arr[item[0]+'71'] = parseFloat(this.s2_arr[item[0]+'70']) > 0 ? 0:
                                  parseFloat(this.s2_arr[item[0]+'68']) - parseFloat(this.s2_arr[item[0]+'69']);

      if(prev_item){
        this.s2_arr[item[0]+'72'] = parseFloat(this.s2_arr[prev_item[0]+'72']) - parseFloat(this.s2_arr[item[0]+'71']) > 0 ?
                              parseFloat(this.s2_arr[prev_item[0]+'72']) - parseFloat(this.s2_arr[item[0]+'71']) : 0;
      }else{
        this.s2_arr[item[0]+'72'] = parseFloat(this.s2_arr['b72']) - parseFloat(this.s2_arr[item[0]+'71']) > 0 ?
                              parseFloat(this.s2_arr['b72']) - parseFloat(this.s2_arr[item[0]+'71']) : 0;
      }

      this.s2_arr[item[0]+'73'] = parseFloat(this.s2_arr[item[0]+'71']) == 0 ? 0 :
                              parseFloat(this.s2_arr[item[0]+'71']) - parseFloat(this.s2_arr[item[0]+'72']) > 0 ?
                              parseFloat(this.s2_arr[item[0]+'72']) : parseFloat(this.s2_arr[item[0]+'71']);

      this.s2_arr[item[0]+'74'] = parseFloat(this.s2_arr[item[0]+'71']) - parseFloat(this.s2_arr[item[0]+'73']) > 0 ?
                                  parseFloat(this.s2_arr[item[0]+'71']) - parseFloat(this.s2_arr[item[0]+'73']) : 0;


      this.s2_arr[item[1]+'14'] = parseFloat(this.s2_arr[item[0]+'14']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;
      this.s2_arr[item[1]+'15'] = parseFloat(this.s2_arr[item[0]+'15']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;
      this.s2_arr[item[1]+'16'] = parseFloat(this.s2_arr[item[0]+'16']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;
      this.s2_arr[item[1]+'17'] = parseFloat(this.s2_arr[item[0]+'17']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;
      this.s2_arr[item[1]+'18'] = parseFloat(this.s2_arr[item[0]+'18']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;

      this.s2_arr[item[1]+'19'] = parseFloat(this.s2_arr[item[1]+'14']) + parseFloat(this.s2_arr[item[1]+'15']) +
                parseFloat(this.s2_arr[item[1]+'16']) + parseFloat(this.s2_arr[item[1]+'17']) + parseFloat(this.s2_arr[item[1]+'18']);

      this.s2_arr[item[1]+'25'] = parseFloat(this.s2_arr[item[0]+'25']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;

      this.s2_arr[item[1]+'28'] = parseFloat(this.s2_arr[item[0]+'28']) / parseFloat(this.s2_arr[item[0]+'14']) * 100;
      this.s2_arr[item[1]+'29'] = parseFloat(this.s2_arr[item[0]+'29']) / parseFloat(this.s2_arr[item[0]+'15']) * 100;
      this.s2_arr[item[1]+'30'] = parseFloat(this.s2_arr[item[0]+'30']) / 
              (parseFloat(this.s2_arr[item[0]+'16']) + parseFloat(this.s2_arr[item[0]+'18'])) * 100;
      this.s2_arr[item[1]+'31'] = parseFloat(this.s2_arr[item[0]+'31']) / parseFloat(this.s2_arr[item[0]+'17']) * 100;
      this.s2_arr[item[1]+'32'] = parseFloat(this.s2_arr[item[0]+'32']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;

      this.s2_arr[item[1]+'40'] = parseFloat(this.s2_arr[item[0]+'40']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;

      this.s2_arr[item[1]+'43'] = parseFloat(this.s2_arr[item[0]+'43']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;

      this.s2_arr[item[1]+'45'] = parseFloat(this.s2_arr[item[0]+'45']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;
      this.s2_arr[item[1]+'46'] = parseFloat(this.s2_arr[item[0]+'46']) / parseFloat(this.s2_arr[item[0]+'43']) * 100;
      this.s2_arr[item[1]+'47'] = parseFloat(this.s2_arr[item[0]+'47']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;
      this.s2_arr[item[1]+'48'] = parseFloat(this.s2_arr[item[0]+'48']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;
      this.s2_arr[item[1]+'49'] = parseFloat(this.s2_arr[item[0]+'49']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;
      this.s2_arr[item[1]+'50'] = parseFloat(this.s2_arr[item[0]+'50']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;
      this.s2_arr[item[1]+'51'] = parseFloat(this.s2_arr[item[0]+'51']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;

      this.s2_arr[item[1]+'54'] = parseFloat(this.s2_arr[item[0]+'54']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;
      this.s2_arr[item[1]+'55'] = parseFloat(this.s2_arr[item[0]+'55']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;
      this.s2_arr[item[1]+'56'] = parseFloat(this.s2_arr[item[0]+'56']) / parseFloat(this.s2_arr[item[0]+'19']) * 100;

      // 合计
      this.s2_arr['af14'] += this.s2_arr[item[0]+'14'];
      this.s2_arr['af15'] += this.s2_arr[item[0]+'15'];
      this.s2_arr['af16'] += this.s2_arr[item[0]+'16'];
      this.s2_arr['af17'] += this.s2_arr[item[0]+'17'];
      this.s2_arr['af18'] += this.s2_arr[item[0]+'18'];
      this.s2_arr['af19'] += this.s2_arr[item[0]+'19'];

      this.s2_arr['af22'] += this.s2_arr[item[0]+'22'];
      this.s2_arr['af23'] += this.s2_arr[item[0]+'23'];
      this.s2_arr['af24'] += this.s2_arr[item[0]+'24'];
      this.s2_arr['af25'] += this.s2_arr[item[0]+'25'];

      this.s2_arr['af28'] += this.s2_arr[item[0]+'28'];
      this.s2_arr['af29'] += this.s2_arr[item[0]+'29'];
      this.s2_arr['af30'] += this.s2_arr[item[0]+'30'];
      this.s2_arr['af31'] += this.s2_arr[item[0]+'31'];
      this.s2_arr['af32'] += this.s2_arr[item[0]+'32'];

      this.s2_arr['af35'] += this.s2_arr[item[0]+'35'];
      this.s2_arr['af36'] += this.s2_arr[item[0]+'36'];
      this.s2_arr['af37'] += this.s2_arr[item[0]+'37'];
      this.s2_arr['af38'] += this.s2_arr[item[0]+'38'];
      this.s2_arr['af39'] += this.s2_arr[item[0]+'39'];
      this.s2_arr['af40'] += this.s2_arr[item[0]+'40'];

      this.s2_arr['af43'] += this.s2_arr[item[0]+'43'];

      this.s2_arr['af45'] += this.s2_arr[item[0]+'45'];
      this.s2_arr['af46'] += this.s2_arr[item[0]+'46'];
      this.s2_arr['af47'] += this.s2_arr[item[0]+'47'];
      this.s2_arr['af48'] += this.s2_arr[item[0]+'48'];
      this.s2_arr['af49'] += this.s2_arr[item[0]+'49'];
      this.s2_arr['af50'] += this.s2_arr[item[0]+'50'];
      this.s2_arr['af51'] += this.s2_arr[item[0]+'51'];
      this.s2_arr['af52'] += this.s2_arr[item[0]+'52'];
      this.s2_arr['af54'] += this.s2_arr[item[0]+'54'];
      this.s2_arr['af55'] += this.s2_arr[item[0]+'55'];
      this.s2_arr['af56'] += this.s2_arr[item[0]+'56'];

      this.s2_arr['af60'] += this.s2_arr[item[0]+'60'];
      this.s2_arr['af61'] += this.s2_arr[item[0]+'61'];
      this.s2_arr['af62'] += this.s2_arr[item[0]+'62'];
      this.s2_arr['af63'] += this.s2_arr[item[0]+'63'];
      this.s2_arr['af64'] += this.s2_arr[item[0]+'64'];
      this.s2_arr['af65'] += this.s2_arr[item[0]+'65'];
      this.s2_arr['af66'] += this.s2_arr[item[0]+'66'];
      this.s2_arr['af67'] += this.s2_arr[item[0]+'67'];
      this.s2_arr['af68'] += this.s2_arr[item[0]+'68'];
      this.s2_arr['af69'] += this.s2_arr[item[0]+'69'];
      
      this.s2_arr['af71'] += this.s2_arr[item[0]+'71'];
      this.s2_arr['af72'] += this.s2_arr[item[0]+'72'];
      this.s2_arr['af73'] += this.s2_arr[item[0]+'73'];
      this.s2_arr['af74'] += this.s2_arr[item[0]+'74'];

      prev_item = item;
    });
  }

}
